/*=+--+=#=+--     Unmanned Aerial System Management Software      --+=#=+--+=#*\
|          Copyright (C) 2011 Regents of the University of Colorado.           |
|                             All Rights Reserved.                             |

     This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License version 2 as
     published by the Free Software Foundation.

     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.

     You should have received a copy of the GNU General Public License
     along with this program.  If not, see <http://www.gnu.org/licenses/>.

            Jack Elston                       Cory Dixon                        
|           elstonj@colorado.edu              dixonc@colorado.edu              |
|                                                                              |
\*=+--+=#=+--                 --+=#=+--+=#=+--                    --+=#=+--+=#*/

/***********************************************************************
 *				  
 * FILENAME:
 * fileServer.h
 *
 * PURPOSE:
 *  This code implements the fileServer data structure between tasks on
 * the flight computer and from ground control station
 *  
 * CREATED:
 * 11/18/2000 - Cory Dixon
 *
 * LAST MODIFIED:
 * $Author: dixonc $
 * $Date: 2005/07/13 21:00:06 $
 * $Revision: 1.2 $
 *
 ***********************************************************************/

#ifndef _FILESERVER_H
#define _FILESERVER_H

#include "fileLog.h"
#include "Thread.h"

using namespace std;


/***********************************************************************
 *
 ***********************************************************************/
class FileServer : public pThread
{

	private:
		string  fileName;
		FileLog log;
		LogFileStruct line;

		int bytesRead;
		struct tm tmTime;

		int     fifo;      // file descripto to fifo


	public:
		FileServer();
		bool init(ShmStruct * shmStructPtr, char *file);

		// Run function
		void update();

};
#endif // _COMMAND_H
